package com.weasel.im.server.initializer;

import com.weasel.im.common.manager.IMSessionManager;
import com.weasel.im.common.manager.LeaveMessageCacheManager;
import com.weasel.im.common.manager.UserSessionRelationManager;
import com.weasel.im.server.handler.CommonMessageHandler;
import com.weasel.im.server.handler.OnlineMessageHandler;

/**
 * Created by Dylan on 2015/12/3.
 */
public class CommonMessageHandlerInitializer extends AbstractMessageHandlerInitializer{


    public CommonMessageHandlerInitializer(IMSessionManager sessionManager, UserSessionRelationManager relationManager, LeaveMessageCacheManager leaveMessageCacheManager) {
        super(sessionManager, relationManager, leaveMessageCacheManager);
    }

    @Override
    protected void initHander(MessageHandlerHolder handlerHolder) {

        handlerHolder.addLast(new OnlineMessageHandler(sessionManager,relationManager,leaveMessageCacheManager))
                     .addLast(new CommonMessageHandler(sessionManager,relationManager,leaveMessageCacheManager));
    }
}
